﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StableDiffusionTools.Imaging
{
    public class StateImage<TKey>
    {
        Dictionary<TKey, Image> stateDictionary;
        public StateImage()
        {
            stateDictionary = new Dictionary<TKey, Image>();
        }

        private void SetState(TKey key, Image value)
        {
            stateDictionary[key] = value;
        }

        private Image GetImage(TKey key)
        {
            return stateDictionary[key];
        }

        public Image this[TKey key]
        {
            get
            {
                return GetImage(key);
            }
            set
            {
                SetState(key, value);
            }
        }
    }
}